/*
* @author dumeng
*/
'use strict'
import request from '@/utils/request'

/**
 * 获取分类树形列表
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/newsClassify/getClassifyTree',
    method: 'POST',
    data
  })
}

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 列表查询
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/queryPage',
    method: 'post',
    data
  })
}

/**
 * 新增
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/update',
    method: 'post',
    data
  })
}

/**
 * 详情
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/get',
    method: 'post',
    data
  })
}

/**
 * 删除
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/deleteById',
    method: 'post',
    data
  })
}

/**
 * 发布/取消发布
 */
export function updateState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/release',
    method: 'post',
    data
  })
}
/**
 * 置顶/取消置顶
 */
export function updateIsTop(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/updateIsTop',
    method: 'post',
    data
  })
}

/**
 * 开关修改
 */
export function set(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/switchStatusChange',
    method: 'post',
    data
  })
}

/**
 * 统一修改-评分状态
 */
export function setEvaluateState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/updateEvaluateState',
    method: 'post',
    data
  })
}

/**
 * 统一修改-点赞状态
 */
export function setFavorState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/updateFavorState',
    method: 'post',
    data
  })
}

/**
 * 统一修改-评论状态
 */
export function setCommentState(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/updateCommentState',
    method: 'post',
    data
  })
}

/**
 * 评论列表
 */
export function queryPage4comment(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/queryPageComment',
    method: 'post',
    data
  })
}
/**
 * 修改评论状态
 */
export function update4comment(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/updateCommentStatus',
    method: 'post',
    data
  })
}
/**
 * 查看评论祖先
 */
export function queryPage4commentParent(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/hdbm/queryPageCommentParent',
    method: 'post',
    data
  })
}

/**
 * 报名列表查询
 */
export function signQueryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/activity/registInfo/queryPageAcitivityRegistInfo',
    method: 'post',
    data
  })
}

/**
 * 导出脱敏
 */
export function maskAPI(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/activity/registInfo/exportActivityRegistInfoMasking',
    method: 'post',
    responseType: 'blob',
    data
  })
}
/**
 * 导出不脱敏
 */
export function noMaskAPI(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/activity/registInfo/exportActivityRegistInfoNoMasking',
    method: 'post',
    responseType: 'blob',
    data
  })
}
